package hmac

import (
	"crypto/hmac"
	"crypto/sha256"
)

// HmacSha256 生成HMAC-SHA256摘要
func HmacSha256(data, key string, opts ...string) ([]byte, error) {
	hash := hmac.New(sha256.New, []byte(key))
	hash.Write([]byte(data))
	return hash.Sum(nil), nil
}
